package cn.jr.dao.impl;

import cn.jr.dao.IWareDao;
import cn.jr.pojo.Wares;
import cn.jr.util.DBHelper;

import java.util.ArrayList;

@SuppressWarnings("all")
public class WareDaoImpl implements IWareDao {

    DBHelper db = new DBHelper();

    @Override //根据商品编号查询
    public Wares queryWaresByWareNumber(String wareNumber) {
        String sql = "select * from twares where waresNumber=?";
        ArrayList<Wares> list =  db.dtQuery(sql, Wares.class, wareNumber);
        return list.size()>0?list.get(0):new Wares(0,null,null,null);
    }
}
